<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
	    <base href="<%=basePath%>">
		<title>设置企业微信信息</title>
        <%@include file="../collect/meta.jsp"%>
        <link rel="stylesheet" href="${ctx }/css/radius.css" type="text/css"></link>
        <link rel="stylesheet" href="css/Inputstyle.css" type="text/css"></link>
        <script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
        <style>
        	.tbinput{
				width: 180px;
				height: 25px;
				font-size: 14px;
				background-color:#FFFFCC;
			}
			td{
				height:60px;
			}
        </style>
    </head>
	<body lang="zh-cn">
		<div class="wrapper">	
	        <c:import url="/collect/top.jsp"></c:import>
			<div class="main-container" id="main-container">
				<div class="main-container-inner">
					<c:import url="/collect/left.jsp"></c:import>
					<div class="main-content">
						<div class="breadcrumbs" id="breadcrumbs">
							<ul class="breadcrumb">
								<li><i class="icon-home home-icon"></i>微信管理</li>
							</ul><!-- .breadcrumb -->
						</div>
						<div class="page-content">
							<div class="row">
								<div class="col-xs-12">
					          		<form action="maccount!setWeixin" name="setwx" method="post">
						          		 <div align="center">
	 								          <table>
							                    <tr>
							                      <td><div align="right"><label>appId:</label></div></td>
							                      <td><input type="text" id="one" name="thirdact.appId" class="input"/></td>
							                      <td><div align="left" id="one"></div></td>
							                    </tr>
							                    <tr>
							                      <td><div align="right"><label>appSecret</label>:</div></td>
							                      <td><input type="text" id="two" name="thirdact.appSecret"   class="input"/></td>
							                      <td><div align="left" id="two"></div></td>
							                    </tr>
							                    <tr>
							                      <td><div align="right"><label>公众账号名称:</label></div></td>
							                      <td><input type="text" id="three" name="thirdact.name"  class="input"/></td>
							                      <td><div align="left" id="three"></div></td>
							                    </tr>
							                    <tr>
							                      <td><div align="right"><label>公众帐号微信号:</label></div></td>
							                      <td><input type="text" id="fover" name="thirdact.weixinName"  class="input"/></td>
							                      <td><div align="left" id="fover"></div></td>
							                    </tr>
							                    <tr>
							                      <td><div align="right"><label>微信账号原始ID:</label></div></td>
							                      <td><input type="text" id="five"  name="thirdact.ysId" class="input"/></td>
							                      <td><div align="left" id="five"></div></td>
							                    </tr>
							                    <tr>
							                      <td><div align="right">
						              				<input type="button" class="btn btn-primary radius"  id="but" value="确定"/>&nbsp;&nbsp;
						              			  </div></td>
							                      <td><div align="center">
							                      		<a href="${ctx }/account/weixinurlexplain.jsp" class="btn btn-success">微信公众帐号对接教程</a>
							                      </div></td>
							                      <td></td>
							                    </tr>
							                  </table>
						                  </div>
					                </form>
								</div><!-- /.col -->
							</div><!-- /.row -->
						</div><!-- /.page-content -->
					</div><!-- /.main-content -->
				</div><!-- /.main-container-inner -->
				<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse" style="position:fixed;bottom:0;">
					<i class="icon-double-angle-up icon-only bigger-110"></i>
				</a>
			</div><!-- /.main-container -->
			<div class="push"></div>
	     </div>
    <c:import url="/collect/down.jsp"></c:import>
     
	<script type="text/javascript">
		$(document).ready(function(){
			$("input[id='one']").focus(function(){
				$(this).addClass("tbinput");
			});
			$("input[id='one']").blur(function(){
				$(this).removeClass("tbinput");
				var one = $(this).val();
				if(one.length!=0){
					$("div[id='one']").html("确认").removeClass("error").addClass("success");
				}else{
					$("div[id='one']").html("必填").removeClass("success").addClass("error");
				}
			});
			$("input[id='two']").focus(function(){
				$(this).addClass("tbinput");
			});
			$("input[id='two']").blur(function(){
				$(this).removeClass("tbinput");
				var one = $(this).val();
				if(one.length!=0){
					$("div[id='two']").html("确认").removeClass("error").addClass("success");
				}else{
					$("div[id='two']").html("必填").removeClass("success").addClass("error");
				}
			});
			$("input[id='three']").focus(function(){
				$(this).addClass("tbinput");
			});
			$("input[id='three']").blur(function(){
				$(this).removeClass("tbinput");
				var one = $(this).val();
				if(one.length!=0){
					$("div[id='three']").html("确认").removeClass("error").addClass("success");
				}else{
					$("div[id='three']").html("必填").removeClass("success").addClass("error");
				}
			});
			$("input[id='fover']").focus(function(){
				$(this).addClass("tbinput");
			});
			$("input[id='fover']").blur(function(){
				$(this).removeClass("tbinput");
				var one = $(this).val();
				if(one.length!=0){
					$("div[id='fover']").html("确认").removeClass("error").addClass("success");
				}else{
					$("div[id='fover']").html("必填").removeClass("success").addClass("error");
				}
			});
			$("input[id='five']").focus(function(){
				$(this).addClass("tbinput");
			});
			$("input[id='five']").blur(function(){
				$(this).removeClass("tbinput");
				var one = $(this).val();
				if(one.length!=0){
					$("div[id='five']").html("确认").removeClass("error").addClass("success");
				}else{
					$("div[id='five']").html("必填").removeClass("success").addClass("error");
				}
			});
			$("#but").click(function(){
				var one = $("div[id='one']").text();
				var two = $("div[id='two']").text();
				var three = $("div[id='three']").text();
				var fover = $("div[id='fover']").text();
				var five = $("div[id='five']").text();
				if(one=="确认"&&two=="确认"&&three=="确认"&&fover=="确认"&&five=="确认"){
					setwx.submit();	
				}else{
					alert("请完善以上信息");
					return false;
				}
			});
			
			//防收回；企业微信信息：$查看平台信息
			$('.weixinguanli > ul').show();
			$('.weixinguanli > ul > li > a').eq(0).css("color","red");
		});
	</script>
  </body>
</html>